<template>
  <div>
    <nav-bar class="detail">
      <div slot="left" @click="back">
        <img src="~assets/imgs/common/back.svg" />
      </div>
      <tab-control
        slot="center"
        :titles="['商品', '参数', '评论', '推荐']"
        @tabclick="controlClick"
      ></tab-control>
    </nav-bar>
  </div>
</template>

<script>
import navBar from "components/common/navBar.vue";
import tabControl from "components/common/tab-control.vue";

export default {
  components: {
    navBar,
    tabControl,
  },
  data() {
    return {};
  },
  methods: {
    back() {
      this.$emit("routerBack");
    },
    controlClick(index) {
      this.$emit("detailNavClick", index);
    },
  },
};
</script>

<style scoped>
.detail {
  background-color: #fff;
}
</style>
